# Maintainer: David Runge <dave@sleepmap.de>
# Maintainer: Daniel M. Capella <polyzen@archlinux.org>
# Contributor: eolianoe <eolianoe At GoogleMAIL DoT com>

_name=pytest-subtesthack
pkgname=python-$_name
pkgver=0.2.0
pkgrel=2
pkgdesc="A hack to explicitly set up and tear down fixtures"
arch=(any)
url="https://github.com/untitaker/pytest-subtesthack"
license=(custom)
depends=(python-pytest)
makedepends=(python-build python-installer python-setuptools python-wheel)
source=($url/archive/$pkgver/$_name-$pkgver.tar.gz)
sha512sums=('8b4f5ee2b07a8bcfa11934f5f207b9418810a708be7b8ccc0f19a4a4b979bbc60e993f0f2a5158482bc0162364bc96717e1ecda6743832ba121dfef9cfca9dd5')
b2sums=('e4e34ff73c7dfe92bed94d40fef168a3420879ba4a28eccb66ae7549d895b0ca7885be57178a6403661b57578f55ac3c5dbcaa090d2b658da770e0cabb0f3a75')

build() {
  cd $_name-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_name-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -vDm 644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
  install -vDm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.rst
}
